package com.xszx.business.controller.admin;

import com.xszx.server.dto.AjaxJson;
import com.xszx.server.dto.Page;
import com.xszx.server.entity.Member;
import com.xszx.server.service.MemberService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/member")
public class MemberController {
    @Resource
    private MemberService memberService;

    @PostMapping("/getAllMembers")
    public Page getAllMembers(@RequestBody Page page){
        return memberService.getAllMembers(page);
    }

    @GetMapping("/getMember")
    public AjaxJson getMember(String id){
        return AjaxJson.success().put("members",memberService.getMember(id));
    }
}
